document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/jquery.ui.core.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/jquery.ui.datepicker.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/i18n/jquery.ui.datepicker-zh-CN.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/i18n/jquery.ui.datepicker-zh-TW.js\"><\/script>");

document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/jquery.bw.check.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"lib\/jquery\/jquery.bw.copyer.js\"><\/script>");

document.writeln("<script type=\"text\/javascript\" src=\"lib\/lib.editor.php\"><\/script>");

$(document).ready(function(){
    if (php_get_ope.match(/^add|amend$/i)){

        xajax_content_model_single_show(php_get_ope);
        xajax_content_model_multi_show(php_get_ope);

        xajax_content_if_enable('if_enable_time', $("#content\\[if_enable\\]").val());
        xajax_content_if_top('if_top_time', $("#content\\[if_top\\]").val());
        xajax_content_if_view('if_view_other', $("#content\\[if_view\\]").val());
        xajax_content_if_inerface('if_inerface_other', $("#content\\[if_inerface\\]").val());
        xajax_content_if_turn('content[if_turn_detail]', $("#content\\[if_turn\\]").attr("checked"), 'form_detail');

        $("#content\\[if_enable_begin\\]").datepicker({changeMonth: true, changeYear: true, yearRange: '-50:+50', dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: 'admin/template/default/{$dir_images_admin}/icon_calendar.gif', buttonImageOnly: true});
        $("#content\\[if_enable_end\\]").datepicker({changeMonth: true, changeYear: true, yearRange: '-50:+50', dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: 'admin/template/default/{$dir_images_admin}/icon_calendar.gif', buttonImageOnly: true});
        $("#content\\[if_top_begin\\]").datepicker({changeMonth: true, changeYear: true, yearRange: '-50:+50', dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: 'admin/template/default/{$dir_images_admin}/icon_calendar.gif', buttonImageOnly: true});
        $("#content\\[if_top_end\\]").datepicker({changeMonth: true, changeYear: true, yearRange: '-50:+50', dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: 'admin/template/default/{$dir_images_admin}/icon_calendar.gif', buttonImageOnly: true});
    }

    $("#check_on").bwcheck({find:"input[handle='topic']",value:'on'});
    $("#check_off").bwcheck({find:"input[handle='topic']",value:'off'});
    $("#check_toggle").bwcheck({find:"input[handle='topic']",value:'toggle'});

    //xajax_page_type('detail_page_word_detail', $("#detail_page_type").val(), 'detail_page_word');
});
